package com.jxc.model.po;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/***********************************************************************
 * Module:  Brand.java
 * Author:  Administrator
 * Purpose: Defines the Class Brand
 ***********************************************************************/

/**
 * 品牌
 * 
 * @pdOid a124f2da-8af4-449c-b0cc-b5bab193c502
 */
@Entity
@Table(name = "SPGL_BRAND")
public class Brand extends IdEntity implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -6908744467210703165L;
	/**
	 * 品牌名称
	 * 
	 * @pdOid 4ddc45a5-8908-4dbb-a69d-fef8e25f6598
	 */
	private String name;
	/**
	 * 代理商
	 * 
	 */
	private User user;
	/**
	 * 是否删除
	 * 
	 */
	private Boolean isDelete;
	/**
	 * 备注
	 * 
	 */
	private String remark;

	private Repertory repertory;

	public Brand() {
		super();
	}

	public Brand(Long id) {
		super(id);
	}

	@Column(name = "NAME")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@ManyToOne(cascade = CascadeType.MERGE)
	@JoinColumn(name = "USER_ID")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Column(name = "IS_DELETE")
	public Boolean getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(Boolean isDelete) {
		this.isDelete = isDelete;
	}

	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "REPERTORY_ID")
	public Repertory getRepertory() {
		return repertory;
	}

	public void setRepertory(Repertory repertory) {
		this.repertory = repertory;
	}

}